package com.v1.model;

import java.util.Date;

import org.apache.commons.lang.StringUtils;

public class Category extends BaseElement {

	private Integer parentid;
	private String name;
	private String author;
	private String thumb;
	private String jsp;
	private Date uploaddate;
	private String digest;

	public String getDigest() {
		return digest;
	}

	public void setDigest(String digest) {
		this.digest = digest;
	}

	public Date getUploaddate() {
		return uploaddate;
	}

	public void setUploaddate(Date uploaddate) {
		this.uploaddate = uploaddate;
	}

	public String getJsp() {
		return jsp;
	}

	public void setJsp(String jsp) {
		this.jsp = jsp;
	}

	public String getThumb() {
		if (StringUtils.isEmpty(thumb)) {
			return NOT_EXIST_THUMB;
		}
		return thumb;
	}

	public String getThumb(String s) {
		if (StringUtils.isEmpty(thumb)) {
			return s;
		}
		return thumb;
	}

	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public Integer getParentid() {
		return parentid;
	}

	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

}
